<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/adminLTE/css/adminlte.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/adminLTE/css/all.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/adminLTE/css/OverlayScrollbars.min.css">
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <link rel="stylesheet" href="../../statics/plugins/layui2.5.6/css/layui.css">
    <script src="${request.contextPath}/statics/libs/jquery.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/layer/layer.js"></script>
    <script src="${request.contextPath}/statics/libs/bootstrap.min.js"></script>
    <script src="${request.contextPath}/statics/libs/vue.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="${request.contextPath}/statics/plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="${request.contextPath}/statics/js/common.js"></script>
    <script src="../../statics/plugins/layui2.5.6/layui.js"></script>
</head>
<body>
<section class="content">
    <div class="container-fluid">
        <div class="row" style="height: 50px;">
            <div class="card-tools">
                <span style="margin-right: 20px;padding-right:20px;border-right: 1px solid #ccc;font-size: 20px;"><i class="icon ion-stats-bars"></i>服务区综合数据导出</span>
                <i class="icon ion-calendar"></i>选择时间:
                <button type="button" class="btn btn-success" style="padding: 0;border: none;background-color:none ;"><input id="beginTime" type="text"placeholder="开始时间"/></button>
                —— <button type="button" class="btn btn-success" style="padding: 0;border: none;background-color: none;"><input id="endTime" type="text"placeholder="结束时间"/></button>
                <button type="button" class="btn btn-success" onclick="cllExp(2)">数据导出</button>

            </div>
        </div>
        <!--<div class="row">
            <div class="col-lg-4 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;">
                        <h3 >昨日平均车位占用率：<span id="yescw">0</span>%</h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="yesscw">0</span>%</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="yesncw">0</span>%</h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-model-s" style="font-size: 60px;"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
            <div class="col-lg-4 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-success">
                    <div class="inner" style="text-align: center;">
                        <h3 >今日平均车位占用率：<span id="todaycw">0</span>%</h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="todayscw">0</span>%</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="todatncw">0</span>%</h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-model-s" style="font-size: 60px;"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
            <div class="col-lg-4 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;color: white;">
                        <h3>本月平均车位占用率：<span id="monthcw">0</span>%</h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="monthscw">0</span>%</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="monthncw">0</span>%</h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-model-s" style="font-size: 60px;"></i>
                    </div>
                </div>
            </div>
        </div>-->
        <div class="row">
            <div class="col-lg-4 col-6">
                <!-- small box -->
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;">
                        <h3>昨日客流量：<span id="zongy">0</span>/人次</h3>
                        <h4 style="display: inline-block;width: 50%;border-right: 1px solid white;">南区：<span id="southy">0</span>/人次</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="northy">0</span>/人次</h4>
                    </div>
                    <div class="icon">
                        <i class="ion ion-android-people"></i>
                    </div>
                </div>
            </div>
            <!-- ./col -->
            <div class="col-lg-4 col-6">
                <!-- small box -->
                <div class="small-box bg-success">
                    <div class="inner" style="text-align: center;">
                        <h3>今日客流量：<span id="zongt">0</span>/人次</h3>
                        <h4 style="display: inline-block;width: 50%;border-right: 1px solid white;">南区：<span id="southt">0</span>/人次</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="northt">0</span>/人次</h4>
                    </div>
                    <div class="icon">
                        <i class="ion ion-android-people"></i>
                    </div>
                </div>
            </div>
            <!-- ./col -->
            <div class="col-lg-4 col-6">
                <!-- small box -->
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;color: white;">
                        <h3>本月客流量：<span id="zongm">0</span>/人次</h3>
                        <h4 style="display: inline-block;width: 50%;border-right: 1px solid white;">南区：<span id="southm">0</span>/人次</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="northm">0</span>/人次</h4>
                    </div>
                    <div class="icon">
                        <i class="ion ion-android-people"></i>
                    </div>
                </div>
            </div>
            <!-- ./col -->
        </div>
        <div class="row">
            <div class="col-lg-3 col-6">
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;">
                        <h3>昨日车流量：<span id="yesterdaycll"></span>/车次</h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="yesterdays"></span>/车次</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="yesterdayn"></span>/车次</h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-android-car" style="font-size: 70px"></i>
                    </div>
                </div>
            </div>
            <div class="col-lg-3 col-6">
                <div class="small-box bg-success">
                    <div class="inner" style="text-align: center;">
                        <h3>今日车流量：<span id="todaycll"></span>/车次</h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="todays"></span>/车次</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="todayn"></span>/车次</h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-android-car" style="font-size: 70px"></i>
                    </div>
                </div>
            </div>
            <div class="col-lg-3 col-6">
                <div class="small-box bg-success">
                    <div class="inner" style="text-align: center;color: white">
                        <h3>本月车流量：<span id="thismothcll"></span>/车次</h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="thismoths"></span>/车次</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="thismothn"></span>/车次</h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-android-car" style="font-size: 70px"></i>
                    </div>
                </div>
            </div>
            <div class="col-lg-3 col-6">
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;">
                        <h3>平均逗留时长：<span id="stayTime"></span>/分钟</h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="stayTimes"></span>/分钟</h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="stayTimen"></span>/分钟</h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-android-car" style="font-size: 70px"></i>
                    </div>
                </div>
            </div>
        </div>
        <!--<div class="row">
            <div class="col-lg-3 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;">
                        <h3 style="font-size: 1.8rem ">昨日销售额：<span id="yesterday"></span></h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="southYesterday">-</span></h4>
                        <h4 style="display: inline-block;width: 49%;" >北区：<span id="northYesterday">-</span></h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-cash" style="font-size: 50px"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
            <div class="col-lg-3 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-success">
                    <div class="inner" style="text-align: center;">
                        <h3 style="font-size: 1.8rem ">今日销售额：<span id="today">-</span></h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;" >南区：<span id="southToday">-</span></h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="northToday">-</span></h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-cash" style="font-size: 50px"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
            <div class="col-lg-3 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-success">
                    <div class="inner" style="text-align: center;">
                        <h3 style="font-size: 1.8rem ">本月销售额：<span id="month">-</span></h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="southMonth">-</span></h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="northMonth">-</span></h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-cash" style="font-size: 50px"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
            <div class="col-lg-3 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;">
                        <h3 style="font-size: 1.8rem ">今日客单价：<span id="kdj">-</span></h3>
                        <h4 style="display: inline-block;width: 49%;border-right: 1px solid white;">南区：<span id="southKdj">-</span></h4>
                        <h4 style="display: inline-block;width: 49%;">北区：<span id="northKdj">-</span></h4>
                    </div>
                    <div class="icon">
                        <i class="icon ion-cash " style="font-size: 50px"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
        </div>-->
        <!--<div class="row">
            <div class="col-lg-3 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;">
                        <h3>南区-男厕</h3>
                        <h4 style="display: inline-block;width: 32%;border-right: 1px solid white;">客流：<span id="rllmans">-</span></h4>
                        <h4 style="display: inline-block;width: 33%;border-right: 1px solid white;">在用：<span id="manuses">-</span></h4>
                        <h4 style="display: inline-block;width: 32%;">未用：<span id="manunuses">-</span></h4>
                        <h4 style="display: inline-block;width: 100%;height: 2%"></h4>
                        <h4 style="display: inline-block;width: 32%;border-right: 1px solid white;">温度：<span id="tempmans">-</span></h4>
                        <h4 style="display: inline-block;width: 33%;border-right: 1px solid white;">湿度：<span id="hummans">-</span></h4>
                        <h4 style="display: inline-block;width: 32%;">臭味浓度：<span id="smellmans">-</span></h4>
                    </div>
                    <div class="icon">
                        <i class="ion ion-man"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
            <div class="col-lg-3 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-success">
                    <div class="inner" style="text-align: center;">
                        <h3>南区-女厕</h3>
                        <h4 style="display: inline-block;width: 32%;border-right: 1px solid white;">客流：<span id="rllwomans">-</span></h4>
                        <h4 style="display: inline-block;width: 33%;border-right: 1px solid white;">在用：<span id="womanuses">-</span></h4>
                        <h4 style="display: inline-block;width: 32%;">未用：<span id="womanunuses">-</span></h4>
                        <h4 style="display: inline-block;width: 100%;height: 2%"></h4>
                        <h4 style="display: inline-block;width: 32%;border-right: 1px solid white;">温度：<span id="tempwomans">-</span></h4>
                        <h4 style="display: inline-block;width: 33%;border-right: 1px solid white;">湿度：<span id="humwomans">-</span></h4>
                        <h4 style="display: inline-block;width: 32%;">臭味浓度：<span id="smellwomans">-</span></h4>
                    </div>
                    <div class="icon">
                        <i class="ion ion-woman"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
            <div class="col-lg-3 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-success">
                    <div class="inner" style="text-align: center;color: white;">
                        <h3>北区-男厕</h3>
                        <h4 style="display: inline-block;width: 32%;border-right: 1px solid white;">客流量：<span id="rllmann">-</span></h4>
                        <h4 style="display: inline-block;width: 33%;border-right: 1px solid white;">在用：<span id="manusen">-</span></h4>
                        <h4 style="display: inline-block;width: 32%;">未用：<span id="manunusen">-</span></h4>
                        <h4 style="display: inline-block;width: 100%;height: 2%"></h4>
                        <h4 style="display: inline-block;width: 32%;border-right: 1px solid white;">温度：<span id="tempmann">-</span></h4>
                        <h4 style="display: inline-block;width: 33%;border-right: 1px solid white;">湿度：<span id="hummann">-</span></h4>
                        <h4 style="display: inline-block;width: 32%;">臭味浓度：<span id="smellmann">-</span></h4>
                    </div>
                    <div class="icon">
                        <i class="ion ion-man"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
            <div class="col-lg-3 col-6">
                &lt;!&ndash; small box &ndash;&gt;
                <div class="small-box bg-info">
                    <div class="inner" style="text-align: center;">
                        <h3>北区-女厕</h3>
                        <h4 style="display: inline-block;width: 32%;border-right: 1px solid white;">客流量：<span id="rllwomann">-</span></h4>
                        <h4 style="display: inline-block;width: 33%;border-right: 1px solid white;">在用：<span id="womanusen">-</span></h4>
                        <h4 style="display: inline-block;width: 32%;">未用：<span id="womanunusen">-</span></h4>
                        <h4 style="display: inline-block;width: 100%;height: 2%"></h4>
                        <h4 style="display: inline-block;width: 32%;border-right: 1px solid white;">温度：<span id="tempwomann">-</span></h4>
                        <h4 style="display: inline-block;width: 33%;border-right: 1px solid white;">湿度：<span id="humwomann">-</span></h4>
                        <h4 style="display: inline-block;width: 32%;">臭味浓度：<span id="smellwomann">-</span></h4>
                    </div>
                    <div class="icon">
                        <i class="ion ion-woman"></i>
                    </div>
                </div>
            </div>
            &lt;!&ndash; ./col &ndash;&gt;
        </div>-->
    </div>
</section>
</body>
<script>
    layui.use('laydate', function() {
        var laydate = layui.laydate;
        //日期时间选择器
        laydate.render({
            elem: '#beginTime'
            ,type: 'date'
        });
        laydate.render({
            elem: '#endTime'
            ,type: 'date'
        });
    });
</script>
<script>
    $(function(){
        cllInfo();
        stayTime();
       // zhanyonglv();
       // checkEmptycw();
        //checkEnvironmentcw();
        rllCount();
       // orderCount();
    });
    function cllExp(type){
        var startTime = $("#beginTime").val();
        var endTime = $("#endTime").val();
        if(startTime==null||startTime==""||endTime==null||endTime==""){
            layer.msg("时间不能为空!");
            return;
        }
       window.location.href =  baseURL + "cll/cllvehiclerecord/exportcll?type="+type+"&startTime="+startTime+"&endTime="+endTime;
    }
</script>
<script>
function cllInfo(){
    var today=null;
    var todays=null;
    var todayn=null;
    var yesterday=null;
    var yesterdays=null;
    var yesterdayn=null;
    var thismoth=null;
    var thismoths=null;
    var thismothn=null;
    $.ajax({
        type: "POST",
        url: baseURL + "cll/cllvehiclerecord/cllYesterdayTodayThismonth",
        contentType: "application/json",
        success: function(r){
            var today1=r.today;
            var yesterday1= r.yesterday;
            var thismoth1= r.thismoth;
            todays=today1[0].length;
            todayn=today1[1].length;
            today=todays+todayn;
            yesterdays=yesterday1[0].length;
            yesterdayn=yesterday1[1].length;
            yesterday=yesterdays+yesterdayn;
            thismoths=thismoth1[0].length;
            thismothn=thismoth1[1].length;
            thismoth=thismoths+thismothn;
            $("#todaycll").html(today);
            $("#todays").html(todays);
            $("#todayn").html(todayn);
            $("#yesterdaycll").html(yesterday);
            $("#yesterdays").html(yesterdays);
            $("#yesterdayn").html(yesterdayn);
            $("#thismothcll").html(thismoth);
            $("#thismoths").html(thismoths);
            $("#thismothn").html(thismothn);
        }
    });
}
function stayTime(){
    $.ajax({
        type: "POST",
        url: baseURL + "cll/cllvehiclerecord/stayTime",
        contentType: "application/json",
        success:function(r){
            $("#stayTime").html(r.stayTime[0]);
            $("#stayTimes").html(r.stayTime[1]);
            $("#stayTimen").html(r.stayTime[2]);
        }
    })
}
function zhanyonglv(){
    $.get( "../../cw/cwparkingspace/cwchart?type=3&startTime=1&endTime=2",function(r){
        $("#yescw").html(r.yesss);
        $("#yesscw").html(r.yess);
        $("#yesncw").html(r.yessn);
        $("#todaycw").html(r.today);
        $("#todayscw").html(r.todays);
        $("#todayncw").html(r.todayn);
        $("#monthcw").html(r.monthss);
        $("#monthscw").html(r.monthsss);
        $("#monthncw").html(r.monthssn);

    });
}
function checkEmptycw(){
    $.ajax({
        type: "POST",
        url: "../../cw/cwparking/checkEmptycw",
        data: {},
        success: function (r) {
            var list = r.list;
            //====连不上算没人
            $("#manuses").html(list[0]);
            $("#manusen").html(list[1]);
            $("#womanuses").html(list[2]);
            $("#womanusen").html(list[3]);
            $("#manunuses").html(10 - Number(list[0]));
            $("#manunusen").html(10 - Number(list[1]));
            $("#womanunuses").html(40 - Number(list[2]));
            $("#womanunusen").html(40 - Number(list[3]));
        }
    });
}
function checkEnvironmentcw(){
    $.ajax({
        type: "POST",
        url: "../../cw/cwparking/checkEnvironmentcw",
        data: {

        },
        success: function(r) {
            var map = r.map;
            if(map.hasOwnProperty("0")){
                $("#rllmann").html(map["0"]+"人/次");
            }
            if(map.hasOwnProperty("1")){
                $("#rllmans").html(map["1"]+"人/次");
            }
            if(map.hasOwnProperty("2")){
                $("#rllwomann").html(map["2"]+"人/次");
            }
            if(map.hasOwnProperty("3")){
                $("#rllwomans").html(map["3"]+"人/次");
            }
            if(map.hasOwnProperty("manntemp")){
                $("#tempmann").html(map["manntemp"]+"℃");
            }
            if(map.hasOwnProperty("mannwet")){
                $("#hummann").html(map["mannwet"]+"%");
            }
            if(map.hasOwnProperty("mannsmell")){
                $("#smellmann").html(map["mannsmell"]+"ppm");
            }
            if(map.hasOwnProperty("womanntemp")){
                $("#tempwomann").html(map["womanntemp"]+"℃");
            }
            if(map.hasOwnProperty("womannwet")){
                $("#humwomann").html(map["womannwet"]+"%");
            }
            if(map.hasOwnProperty("womannsmell")){
                $("#smellwomann").html(map["womannsmell"]+"ppm");
            }

            if(map.hasOwnProperty("manstemp")){
                $("#tempmans").html(map["manstemp"]+"℃");
            }
            if(map.hasOwnProperty("manswet")){
                $("#hummans").html(map["manswet"]+"%");
            }
            if(map.hasOwnProperty("manssmell")){
                $("#smellmans").html(map["manssmell"]+"ppm");
            }
            if(map.hasOwnProperty("womanstemp")){
                $("#tempwomans").html(map["womanstemp"]+"℃");
            }
            if(map.hasOwnProperty("womanswet")){
                $("#humwomans").html(map["womanswet"]+"%");
            }
            if(map.hasOwnProperty("womanssmell")){
                $("#smellwomans").html(map["womanssmell"]+"ppm");
            }

        }
    });
}
function rllCount(){
    var type = 0;
    $.get(baseURL + "rll/rllhourcount/rllCountHp", function(r){
        $("#zongy").html(r.zongy);
        $("#southy").html(r.southy);
        $("#northy").html(r.northy);
        $("#zongm").html(r.zongm);
        $("#southm").html(r.southm);
        $("#northm").html(r.northm);
    });
    $.get( "../../rll/rllhourcount/kllChart1/"+type,function(r) {
        $("#zongt").html(Number(r.southList[2])+Number(r.northList[2]));
        $("#southt").html(r.southList[2]);
        $("#northt").html(r.northList[2]);
    });
}
function orderCount(){
    $.get(baseURL + "jxc/jxcsaleorder/orderCount", function(r){
        $('#today').text((r.southToday+r.northToday).toFixed(1)+"元");
        $('#southToday').text(r.southToday+"元");
        $('#northToday').text(r.northToday+"元");

        $('#yesterday').text((r.southYesterday+r.northYesterday).toFixed(1)+"元");
        $('#southYesterday').text(r.southYesterday+"元");
        $('#northYesterday').text(r.northYesterday+"元");

        $('#month').text((r.southMonth+r.northMonth).toFixed(1)+"元");
        $('#southMonth').text(r.southMonth+"元");
        $('#northMonth').text(r.northMonth+"元");

        if(!r.southKdj){

        }
        $('#kdj').text(((r.southKdj+r.northKdj)/2).toFixed(1)+"元");
        $('#southKdj').text(r.southKdj.toFixed(2)+"元");
        $('#northKdj').text(r.northKdj.toFixed(2)+"元");

    });
}
</script>
</html>